package com.netease.financial.common.util;

import android.graphics.drawable.Drawable;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.view.View;

/**
 * Created by hzwuyufeng on 1/22/16.
 */
public class ViewUtils {

    public static void tintWidget(View view, int color) {
        Drawable wrappedDrawable = DrawableCompat.wrap(view.getBackground());
        DrawableCompat.setTint(wrappedDrawable, view.getResources().getColor(color));
        view.setBackground(wrappedDrawable);
    }

}
